from langchain_ollama import OllamaEmbeddings

embeddings = OllamaEmbeddings(base_url='http://localhost:11434',model="mxbai-embed-large")
vector = embeddings.embed_query("Llamas are members of the camelid family")
print(f"嵌入维度: {len(vector)}")